﻿<?php
$this->pageTitle = Yii::app()->name . ' - Login';
$this->breadcrumbs = array(
    Yii::t('default', 'Login'),
);
$path = Yii::app()->request->baseUrl . '/';
?>
<link href="<?php echo $path ?>css/search.css" rel="stylesheet" type="text/css" />

<div style="margin-left: 20%;padding-left: 25px;width: 55%;background-color:#EEE;border:#AFD0F5 1px; border-style:ridge;border-radius:5px;">
    <h2 style="padding-left:80px;"><b><font style="color: #0066A4;"><?php echo mb_strtoupper(Yii::t('default', 'Login'), 'utf-8'); ?></font></b></h2>
    <div class="form">
        <?php
        $form = $this->beginWidget('CActiveForm', array(
            'id' => 'login-form',
            'enableClientValidation' => true,
            'clientOptions' => array(
                'validateOnSubmit' => true,
            ),
                ));
        ?>

        <div class="row">
            <?php echo $form->labelEx($model, 'email'); ?>
            <?php echo $form->textField($model, 'email', array('size' => 40)); ?>
            <?php echo $form->error($model, 'email'); ?>
        </div>

        <div class="row">
            <?php echo $form->labelEx($model, 'password'); ?>
            <?php echo $form->passwordField($model, 'password', array('size' => 40)); ?>
            <?php echo $form->error($model, 'password'); ?>
        </div>

        <div class="row rememberMe">
            <?php echo $form->checkBox($model, 'rememberMe'); ?>
            <?php echo $form->label($model, 'rememberMe'); ?>
            <?php echo $form->error($model, 'rememberMe'); ?>
        </div>

        <div class="row buttons" style="padding-left:80px;">
            <?php echo CHtml::submitButton(Yii::t('default', 'Login')); ?>
        </div>

        <?php $this->endWidget(); ?>
    </div>
    <div>
        <?php if (Yii::app()->user->hasFlash('message-login')): ?>
            <div class="flash-notice" style="background: none repeat scroll 0 0 #F79646;height: 50px;margin-bottom: 5px; padding: 5px; width: 94%;">
                <b>Email hoặc Mật khẩu chưa đúng. Nếu bạn chưa là thành viên vui lòng đăng ký tại <a href="<?php echo $this->createUrl('site/register') ?>">
                    here</a>  </b>
            </div>
        <?php endif; ?>
    </div>
</div>